<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet"  type="text/css"  href="/lib/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="/css/custom.css">
    <link rel="stylesheet" href="/css/iosOverlay.css">
    <link rel="stylesheet" href="/css/prettify.css">
    <script src="/lib/plug/modernizr-2.0.6.min.js"></script>
    <link rel="stylesheet"  type="text/css" href="/css/orderhandle.css">
    <style>
        .durk{
            color: #999;
        }
    </style>
</head>
<body>
<div class="panel panel-default">
    <div class="panel-heading"><span style="font-weight: 600">订单编号:</span ><i>{$orders[0]['order_number']}</i><span >&nbsp;&nbsp;  下单时间:</span><i>{$orders[0]['create_time']}</i></div>
    <input type="text" hidden name="orderNum" value="{$orders[0]['order_number']}">
    <div class="panel-body">
        <form action="">
            <div class="row ">
                <div class="col-sm-3">
                    <div class="panel panel-default userdesc" style="margin: 0">
                        <div class="panel-heading">订单信息</div>
                        <div class="panel-body userdesc">
                            <div><span>收货人 &nbsp;&nbsp;：</span><span class="desc">{$orders[0]['buyer_name']}</span></div>
                            <div><span>手机号码：</span><input class="desc" type="text" name="phoneNum" disabled value="{$orders[0]['buyer_phone']}"></div>
                            <div><span>订单编号 ：</span><span class="desc">{$orders[0]['order_number']}</span></div>
                            <div><span>付款方式：</span>
                                {if condition="$orders[0]['pay_staff'] eq 1"}
                                <span class="desc"> 银行卡 </span>
                                {elseif condition="$orders[0]['pay_staff'] eq 2"}
                                <span class="desc"> 支付宝 </span>
                                {elseif condition="$orders[0]['pay_staff'] eq 3"}
                                <span class="desc"> 微信 </span>
                                {else /}
                                <span class="desc"> 未支付 </span>
                                {/if}
                            </div>
                            {if condition="$orders[0]['pay_status'] eq 1"}
                                {if condition="$orders[0]['pay_staff'] eq 1"}
                                    <div><span>银行卡账号：</span><span class="desc">{$orders[0]['pay_number']}</span></div>
                                    <div><span>银行卡交易号：</span><span class="desc">12356485</span></div>
                                {elseif condition="$orders[0]['pay_staff'] eq 2"}
                                    <div><span>支付宝账号：</span><span class="desc">{$orders[0]['pay_number']}</span></div>
                                    <div><span>支付宝交易号：</span><span class="desc">12356485</span></div>
                                {elseif condition="$orders[0]['pay_staff'] eq 3"}
                                    <div><span>微信账号：</span><span class="desc">{$orders[0]['pay_number']}</span></div>
                                    <div><span>微信交易号：</span><span class="desc">12356485</span></div>
                                {/if}
                                {if condition="$orders[0]['pay_status'] eq 1"}
                                    <div class="durk"><span>付款时间：</span><span class="desc">{$orders[0]['pay_time']|date="Y-m-d h:i:s",###}</span></div>
                                {/if}
                                {if condition="$orders[0]['order_staff'] eq 3 AND $orders[0]['freight_staff'] eq 2"}
                                    <div  class="durk"><span>成交时间：</span><span class="desc">{$orders[0]['finish_time']|date="Y-m-d h:i:s",###}</span></div>
                                {/if}
                            {/if}
                            <div ><span style="vertical-align: top;margin-top: 10px">收货地址:</span>
                                <textarea disabled name=""   cols="30" rows="5" class="desc" >{$orders[0]['order_addr']}</textarea></div>
                        </div>
                    </div>
                    <!--物流详情-->
                    {if condition="($orders[0]['freight_staff'] eq 1) OR ($orders[0]['freight_staff'] eq 2) "}
                        <div class="panel panel-default">
                            <div class="panel-heading">物流详情</div>
                            <div class="panel-body">
                                <div style="line-height: 25px">物流类型：<span>{$orders[0]['send_mode']}</span></div>
                                <div style="line-height: 25px">物流单号：<span>{$orders[0]['logistics_num']}</span></div>
                                <div style="line-height: 25px">发货时间：<span>{$orders[0]['shop_send_time']|date="Y-m-d h:i:s",###}</span></div>
                            </div>
                        </div>
                    {/if}

            </div>
                <div class="col-sm-9 ">
                    <table class="table "style="text-align: center;border: 1px solid #BBBBBB">
                        <thead style="border: 1px solid #BBBBBB;background-color:#eeeeee;" >
                        <tr style="border-bottom: 1px solid #BBBBBB">
                            <td>商品名称</td>
                            <td>购买数量</td>
                            <td>单价</td>
                            <td>配送方式</td>
                            <!--<td>配送费</td>-->
                            <td>金额小计</td>
                        </tr>
                        </thead>
                        <tbody>
                        {foreach $shops as $shop}
                        <tr>
                            <td>
                                <img src="{$shop['image_path']}" style="display: block;width: 50px;height: 50px;margin: 0 auto" >
                                <p class="good-brand">编号：<i>010-A-b</i></p>
                                <p class="good-name">商品名：{$shop['shop_name']}</p>
                            </td>
                            <td>{$shop['shop_num']}</td>
                            <td class="price">
                                ¥<i>{$shop['shop_price']}</i>
                            </td>
                            <td>
                                中通快递
                            </td>
                            <!--<td class="price">-->
                            <!--¥<i>{$shop['freight']}</i>-->
                            <!--</td>-->
                            <td class="price">
                                ¥<i>{$shop['shop_total']}</i>
                            </td>
                        </tr>
                        {/foreach}
                        </tbody>
                    </table>
                    <div class="pull-right pay">
                        <p><span>商品总金额: ¥<i>{$all['goods_total']}</i> <i>(共{$all['goods_num']}件)</i> </span> &nbsp;<span>配送费: <i>¥{$shop['freight']}</i></span></p>
                        <p >订单总金额:¥<i>{$orders[0]['order_money']}</i></p>
                        <span >买家留言：</span><span class="leavebox">{$orders[0]['buyer_message']}</span>
                    </div>
                </div>

            </div>
        </form>
    </div>
</div>
<script src="/lib/jquery/jquery.min.js"></script>
<script src="/lib/bootstrap/js/bootstrap.min.js"></script>
<script src="/js/iosOverlay.js"></script>
<script src="/lib/plug/spin.min.js"></script>
<script src="/lib/plug/prettify.js"></script>
<script src="/js/orderhandle.js"></script>
<script>
    /*无效订单*/
    $("#InvalidOrders").click(function () {
        var order_number=$("input[name=orderNum]").val();
        if (confirm("该订单已支付，是否办理退款？")){
            $.ajax({
                url:"{:url('admin/order/orderInvalid')}",
                type:"post",
                data:{"order_number":order_number},
                dataType:"json",
                async:false,
                success:function (val) {
                    console.log(val)
                }
            });
            return false
        }
    });

</script>
</body>
</html>